import {
    INCREMENT
} from './mutations-types';

export default {
    /* outTimeCount(context){
        setTimeout(()=>{
            context.commit(INCREMENT);
        },2000);
    } */
    //上面的函数还可以这么写:
    outTimeCount(context) {
        return new Promise((resolve) => {
            setTimeout(() => {
                context.commit(INCREMENT);
                resolve('加一完成');
            }, 2000);
        });
    }
}